package cn.wolfcode.trip.base.query;

import lombok.Getter;
import lombok.Setter;
import org.springframework.util.StringUtils;

@Getter
@Setter
public class QueryObject {
	private int currentPage = 1;
	private int pageSize =4;
	//设置排序
	private String orderBy;

	//设置排序
	public  String getOrderBy(){
		return StringUtils.hasLength(orderBy)?orderBy.trim():null;
	}


	public int getBeginIndex() {
		return (currentPage - 1) * pageSize;
	}
}
